#ifndef __GSPRITE_H__
#define __GSPRITE_H__

#include "windows.h"
#include "d3d9.h"
#include "d3dx9.h"

class CSprites
{
public:
	static LPD3DXSPRITE	_spriteHandler;
	LPDIRECT3DTEXTURE9	_image;
	int					_width;							
	int					_height;				
	int					_index;	
	int					_count;	
	bool				_loop;
	int					_row;
	bool				_enable;
	bool				_clear;
	int					_alpha;
	int					_left;
	int					_top;
	DWORD				_rootTime;
	DWORD				_oldTime;
	int					_totalExistTime;
	int					_interval;

// 	CSprites(LPCSTR filePath,bool loop,int index,int count,int row,int width,int height,
// 		int left,int top,int totalExistTime,int interval);
	CSprites(LPDIRECT3DTEXTURE9 image,bool loop,int index,int count,int row,int width,int height,
		int left,int top,int totalExistTime,int interval);

	CSprites(LPCSTR filePath, int width, int height, int count, int row);

	~CSprites(void);

	static LPDIRECT3DTEXTURE9 LoadTexture(LPCSTR filePath,D3DCOLOR transcolor);

	void Draw(int VirtualLeft,int StyleDraw,bool isClear);

	void Render(float,float,int);
};
#endif